package com.dirox.plugins.utils;

import java.util.Comparator;

import com.dirox.plugins.ao.entities.Note;

public class NoteComparator implements Comparator<Note> {

	@Override
	public int compare(Note note1, Note note2) {
		if (note1.getPriority() < note2.getPriority())
			return 1;
		else if (note1.getPriority() > note2.getPriority()) {
			return -1;
		} else {
			return (note1.getID() > note2.getID() ? 1 : -1);
		}
	}

}
